From: Roan Kattouw Date: Sat, 10 Apr 2010 10:08:29 +0000 (+0000) Subject: Fix yet another instance of comparing the result of User::newFromName to null X-Git-Tag: 1.31.0-rc.0~37172 X-Git-Url: http://git.cyclocoop.org/%7D%7Cconcat%7B?a=commitdiff_plain;h=f3f93dd4163fd7216e065330e39bf8a97f507f17;p=lhc%2Fweb%2Fwiklou.git Fix yet another instance of comparing the result of User::newFromName to null --- diff --git a/includes/specials/SpecialEmailuser.php b/includes/specials/SpecialEmailuser.php index 1c16576bad..6d42f31c4d 100644 --- a/includes/specials/SpecialEmailuser.php +++ b/includes/specials/SpecialEmailuser.php @@ -303,7 +303,7 @@ class EmailUserForm { } $nu = User::newFromName( $nt->getText() ); - if( is_null( $nu ) || !$nu->getId() ) { + if( !$nu instanceof Title || !$nu->getId() ) { wfDebug( "Target is invalid user.\n" ); return "notarget"; } else if ( !$nu->isEmailConfirmed() ) {